package com.sunjob.mroresumeproject.service;

import com.sunjob.common.domain.mroresume.TFBus;
import com.sunjob.common.util.MROUtils;
import com.sunjob.mroresumeproject.dao.TFBusMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TFBusServiceImpl implements TFBusService{
    @Autowired
    TFBusMapper tfBusMapper;


    @Override
    public int querycount(String types) {
        return tfBusMapper.querycount(types);
    }



    @Override
    public List<TFBus> querytransform2(Long transformid) {
        return tfBusMapper.querytransform2(transformid);
    }



    @Override
    public List<TFBus> querytransformone(String transformid) {
        return tfBusMapper.querytransformone(transformid);
    }

    @Override
    public void updatetransform(TFBus tfBus) {
//        System.out.println(tfBus.getTransformid());
//         tfBusMapper.updatetransform(tfBus.getTransformid(),tfBus.getTypes(),tfBus.getBustypes(),tfBus.getUseparts(),tfBus.getManagement(),tfBus.getFault(),tfBus.getTFstate(),tfBus.getFailreason(),tfBus.getMoney());
          tfBusMapper.updatetransform(tfBus);
    }

    @Override
    public void deletetransform(String transformid) {
          tfBusMapper.deletetransform(transformid);
    }

    @Override
    public void deletetransformone(String s) {
           tfBusMapper.deletetransformone(s);
    }



    @Override
    public void inserttransform(TFBus tfBus) {

        tfBusMapper.inserttransform(tfBus);
    }

    @Override
    public TFBus query2(String transformid) {
        return tfBusMapper.query2(transformid);
    }

    @Override
    public List<TFBus> querytransform(int i, int size, String types) {
        return tfBusMapper.querytransform(i,size,types);
    }


}
